﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IdentityModel.Claims;
using System.IdentityModel.Tokens;

namespace Sinacor.Infra.Service.Security.Authorization
{
    /// <summary>
    /// Interface de utilização do Provider de Autorização
    /// </summary>
    public interface IAuthorizationProvider
    {
        User RetrieveUser(int userId);

        User RetrieveUser(string login);

        IList<Claim> RetrieveAuthorizationClaims(SecurityToken token);

        List<string> RetrieveFunctions(int userId, int companyId, string moduleId);

        List<string> RetrieveOperations(SecurityToken token);

        Operation CheckAcessToOperation(int companyId, string operationName);

        List<string> RetrieveModuleIds(int userId, int companyId);

        List<string> RetrieveInstalledModuleIds(int companyId);
    }
}
